<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS事件监听</title>
</head>
<body>
    <!-- //事件监听1通过HTML的事件属性 -->
    <input type="submit" value="hello" onclick="on()">
    <!-- //事件监听2，通过DOM的元素属性 -->
    <input type="submit" value="hello2" id="22">
</body>
<script>
    function on(){
        console.log("我被点击了");
    }

    document.getElementById("22").onclick = () => {
        console.log("我又被点击了")
    }
    // onclick
    // onblur
    // onfocus
    // onload
    // onsubmit
    // onkeydown
    // onmouseover
    // onmouseout

    
</script>
</html>